<!-- 商品评价 -->
<template>
	<view class="goods-evaluate">
		<view class="df-cen-rl goods-evaluate-header">
			<view class="goods-evaluate-title">商品评价({{ totals }})</view>
			<view class="goods-evaluate-lever df-ai-cen" v-if="totals > 10">
				更多评论
				<text class="cuIcon-right" style="font-size: 40rpx;"></text>
			</view>
			<view v-else></view>
		</view>
		<scroll-view class="scroll-evaluate" :scroll-x="true" :scroll-with-animation="true">
			<view class="scroll-evaluate-item" v-for="(item, inx) in list" :key="inx">
				<avatar-name :avatar="$Utils.img(item.member_headimg)" :name="item.member_name"></avatar-name>
				<view class="evaluate-item-title line-text">{{ item.content }}</view>
				<view class="evaluate-item-imgs df-ai-cen">
					<view class="item-imgs-son" v-for="v in item.imgList" :key="v">
						<!-- $Utils.img(v) ||  -->
						<image :src="v || item.sku_image" mode="aspectFit" style="width: 100%;height: 100%;border-radius: 10rpx;"></image>
					</view>
				</view>
			</view>
		</scroll-view>
	</view>
</template>
<script>
export default {
	name: 'goods-evaluate',
	data() {
		return {};
	},
	props: {
		// 评价列表
		list: {
			type: Array,
			default: () => {
				return [];
			}
		},
		totals: {
			type: [Number, String],
			default: 0
		}
	},
	methods: {
		// imgsList(str) {
		// 	return str.split()
		// }
	},
	mounted() {}
};
</script>

<style lang="scss">
.goods-evaluate {
	padding: 40rpx 30rpx;
	background-color: #ffffff;
	.goods-evaluate-header {
		margin-bottom: 30rpx;
		.goods-evaluate-title {
			font-size: 32rpx;
			font-family: PingFang SC;
			font-weight: bold;
			color: #222222;
		}
		.goods-evaluate-lever {
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #fd3b5c;
		}
	}
	.scroll-evaluate {
		white-space: nowrap;
		width: 100%;
		.scroll-evaluate-item {
			position: relative;
			display: inline-block;
			width: 450rpx;
			margin-right: 20rpx;
			padding: 20rpx;
			border: 1px solid #cccccc;
			border-radius: 20rpx;
		}
		.evaluate-item-title {
			margin: 20rpx 0;
			font-size: 28rpx;
			font-family: PingFang SC;
			font-weight: 500;
			color: #222222;
		}
		.evaluate-item-imgs {
		}
		.item-imgs-son {
			width: 80rpx;
			height: 80rpx;
			margin-right: 16rpx;
			border-radius: 10rpx;
		}
	}
}
</style>
